﻿using System;
using System.Drawing;

namespace MarioMapEditor
{
    class ObDeathField : ObObject
    {
        public enum DEATHFIELD { Deathfield1 = 120};

        public ObDeathField()
        {
            ID =(int) DEATHFIELD.Deathfield1;
            Width   = 1;
            Height  = 1;
        }

        public override bool SetID(int nID)
        {
            if (checkType(nID))
            {
                ID = nID;
                return true;
            }
            return false;
        }

        public static bool checkType(int objectID)
        {
            if (Enum.IsDefined(typeof(DEATHFIELD), objectID))
            {
                return true;
            }
            return false;
        }

        public override Bitmap GetBitmap()
        {
            if (!checkType(ID))
            {
                return null;
            }
            var src = Properties.Resources.DeathField;
            return src;
        }
    }
}
